/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ProblemSubmitAddDTO } from '../models/ProblemSubmitAddDTO';
import type { ProblemSubmitQueryRequest } from '../models/ProblemSubmitQueryRequest';
import type { RPageProblemSubmitVO } from '../models/RPageProblemSubmitVO';
import type { RProblemSubmit } from '../models/RProblemSubmit';
import type { RSubmitSummaryVo } from '../models/RSubmitSummaryVo';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class ProblemSubmitControllerService {

    /**
     * @param requestBody
     * @returns RProblemSubmit OK
     * @throws ApiError
     */
    public static doProblemSubmit(
        requestBody: ProblemSubmitAddDTO,
    ): CancelablePromise<RProblemSubmit> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/oj/problem_submit',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody
     * @returns RPageProblemSubmitVO OK
     * @throws ApiError
     */
    public static listProblemSubmitVoByUserId(
        requestBody: ProblemSubmitQueryRequest,
    ): CancelablePromise<RPageProblemSubmitVO> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/oj/problem_submit/pageByUser/vo',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param requestBody
     * @returns RPageProblemSubmitVO OK
     * @throws ApiError
     */
    public static listProblemSubmitVoByPage(
        requestBody: ProblemSubmitQueryRequest,
    ): CancelablePromise<RPageProblemSubmitVO> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/oj/problem_submit/page/vo',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * @param id
     * @returns RProblemSubmit OK
     * @throws ApiError
     */
    public static getProblemSubmitVoById(
        id: number,
    ): CancelablePromise<RProblemSubmit> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/oj/problem_submit/{id}',
            path: {
                'id': id,
            },
        });
    }

    /**
     * @returns RSubmitSummaryVo OK
     * @throws ApiError
     */
    public static getSubmitSummary(): CancelablePromise<RSubmitSummaryVo> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/oj/problem_submit/summary',
        });
    }

}
